{% extends 'web/layout/base.html' %}

{% block title %}
用户注册
{% endblock %}

{% block css %}
<style>
    .account {
            width: 400px;
            margin: 0 auto;
        }
</style>
{% endblock %}


{% block content %}
<div class="account">
    <h2 style="text-align: center;">注册用户</h2>
    <form>
        {% for field in form %}
        <div class="form-group">
            {% if field.name == 'code' %}
            <div class="form-group">
                <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                <div class="row clearfix">
                    <div class="col-sm-7">{{ field }}</div>
                    <div class="col-sm-5">
                        <button type="submit" class="btn btn-info">点击获取验证码</button>
                    </div>
                </div>
            </div>

            {% else %}
            <label for="{{ field.id_for_label }}">{{ field.label }}</label>
            {{ field }}
            {% endif %}
        </div>
        {% endfor %}
        
        <div class="row clearfix">
            <div class="col-sm-5" style="margin-left: 40px;">
                <button type="submit" class="btn btn-primary" style="width: 120px;">注 册</button>
            </div>
            <div class="col-sm-5">
                <button type="submit" class="btn btn-primary" style="width: 120px;">重置输入</button>
            </div>
        </div>
        
    </form>
</div>
{% endblock %}

{% block js %}
{% endblock %}